<include file="public:header"/>
<div class="seltpye_y">
    <div class="tit">企业认证</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.status' value=''>select</neq>">{$Think.get.status_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('status'=>'','status_cn'=>'不限'))}">不限</li>
        <li url="{:P(array('status'=>'1','status_cn'=>'待审核'))}">待审核</li>
        <li url="{:P(array('status'=>'2','status_cn'=>'已审核'))}">已审核</li>
        <li url="{:P(array('status'=>'3','status_cn'=>'未通过'))}">未通过</li>
    </div>
</div>

<div class="seltpye_y">
    <div class="tit">申请时间</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.settr' value=''>select</neq>">{$Think.get.settr_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('settr'=>'','settr_cn'=>'不限'))}">不限</li>
        <li url="{:P(array('settr'=>'3','settr_cn'=>'三天内'))}">三天内</li>
        <li url="{:P(array('settr'=>'7','settr_cn'=>'一周内'))}">一周内</li>
        <li url="{:P(array('settr'=>'30','settr_cn'=>'一月内'))}">一月内</li>
        <li url="{:P(array('settr'=>'180','settr_cn'=>'半年内'))}">半年内</li>
        <li url="{:P(array('settr'=>'360','settr_cn'=>'一年内'))}">一年内</li>
    </div>
</div>

<div class="clear"></div>

<form id="form1" name="form1" method="post" action="{:U('refund/delete_company')}">
    <div class="list_th">
        <div class="td" style=" width:20%;">
            <label id="chkAll" class="left_padding">
                <input type="checkbox" name="chkAll" id="chk" title="全选/反选"/>职位名称
            </label>
        </div>
        <div class="td" style=" width:8%;">企业名称</div>
        <div class="td center" style=" width:8%;">退款金额</div>
        <div class="td center" style=" width:18%;">备注信息</div>
        <div class="td center" style=" width:8%;">支付方式</div>
        <div class="td center" style=" width:8%;">退款状态</div>
        <div class="td center" style=" width:8%;">审核时间</div>
        <div class="td center" style=" width:8%;">创建时间</div>
        <div class="td" style=" width:14%;">操作</div>
        <div class="clear"></div>
    </div>

    <volist name="list" id="vo">
        <div class="list_tr link_black">
            <div class="td" style=" width:20%;">
                <div class="left_padding striking">
                    <input name="y_id[]" type="checkbox" id="id" value="{$vo['id']}"/>{$vo['jobs_name']}
                </div>
            </div>
            <div class="td" style=" width:8%;">{$vo['companyname']}</div>
            <div class="td center" style=" width:8%;">{$vo['money']}</div>
            <div class="td center" style=" width:18%;"><if condition="$vo.remarks eq ''"><span style="color: #6a737d">--</span><else/>{$vo['remarks']}</if></div>
            <div class="td center" style=" width:8%;">{$vo['payment_cn']}</div>
            <div class="td center" style=" width:8%;">
                <if condition="$vo['status'] eq 1">待审核</if>
                <if condition="$vo['status'] eq 2"><span style="color: #009900">已通过</span></if>
                <if condition="$vo['status'] eq 3"><span style="color:#FF3300">未通过</span></if>
            </div>

            <div class="td center" style=" width:8%;"><if condition="$vo.uptime eq 0"><span style="color: #6a737d">--</span><else/>{:admin_date($vo['uptime'])}</if></div>
            <div class="td center" style=" width:8%;">{:admin_date($vo['addtime'])}</div>

            <div class="td edit" style=" width:14%;">
                <a href="{:U('edit',array('uid'=>$vo['uid'],'id'=>$vo['id']))}">审核</a>
            </div>
            <div class="clear"></div>
        </div>
    </volist>
</form>

<empty name="list">
    <div class="list_empty">没有任何信息！</div>
</empty>

<div class="list_foot">
    <div class="btnbox">
        <!--<input type="button" class="admin_submit" id="ButRefresh" value="刷新"/>
        <input type="button" class="admin_submit" id="ButDel" value="删除"/>-->
    </div>

    <div class="footso">
        <form action="?" method="get">
            <div class="sobox">
                <input type="hidden" name="m" value="{:C('admin_alias')}">
                <input type="hidden" name="c" value="{:CONTROLLER_NAME}">
                <input type="hidden" name="a" value="{:ACTION_NAME}">
                <input name="key" type="text" class="sinput" value="{$Think.get.key}"/>
                <input name="key_type" id="J_key_type_id" type="hidden" value="{$Think.get.key_type|default='1'}" />
                <input name="key_type_cn" id="J_key_type_cn" type="hidden" value="{$Think.get.key_type_cn|default='公司名'}"/>
                <input name="" type="submit" value="" class="sobtn"/>
                <div class="sotype" id="J_key_click">{$Think.get.key_type_cn|default='职位'}</div>
                <div class="mlist" id="J_mlist">
                    <ul>
                        <li id="1" title="ID">ID</li>
                        <li id="2" title="职位">职位</li>
                        <li id="3" title="名称">名称</li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="pages">{$page}</div>

</div>
<include file="public:footer"/>

</body>
<script type="text/javascript">
    $(document).ready(function () {
        $(".J_message").click(function () {
            $('.modal_backdrop').remove();
            $('.modal').remove();
            var qsDialog = $(this).dialog({
                title: '发消息',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/ajax_message')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        // 企业迁移
        $(".J_migration").click(function () {
            $('.modal_backdrop').remove();
            $('.modal').remove();
            var qsDialog = $(this).dialog({
                title: '账号迁移',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = $(this).data('url');
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //审核日志
        $(".audit_log").click(function () {
            var qsDialog = $(this).dialog({
                title: '审核日志',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/company_audit_log')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        $(".company_log").click(function () {
            var qsDialog = $(this).dialog({
                title: '企业日志',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/company_log')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });

        //套餐详情
        $(".setmeal_detail").click(function () {
            var qsDialog = $(this).dialog({
                title: '套餐详情',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/setmeal_detail')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //业务
        $(".business").click(function () {
            var qsDialog = $(this).dialog({
                title: '业务',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/business')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //批量审核
        $("#ButAudit").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '审核企业',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/company_audit')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        //批量刷新
        $("#ButRefresh").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '刷新',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/refresh_company')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        //点击批量删除
        $("#ButDel").click(function () {
            if (confirm('删除企业，该企业所属会员、职位、简历信息将同步删除')) {
                $("form[name=form1]").attr("action", "{:U('delete_company')}");
                $("form[name=form1]").submit();
            }
        });
        /*//批量删除
        $("#ButDel").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '删除企业',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/delete_company')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });*/
        //设置顾问
        $("#ButConsultant").click(function () {
            var ids = $("input[name='y_id[]']:checked");
            if(ids.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '设置顾问',
                    loading: true,
                    footer : false
                });
                var data = $("[name=form1]").serialize();
                var url = "{:U('Ajax/set_consultant')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        <if condition="$apply['Export']">
            //点击批量导出
            $("#ExPort").click(function () {
                var data = $("form[name=form1]").serialize();
                if(data.length == 0){
                    disapperTooltip('remind','请选择企业！');
                    qsDialog.hide();
                }
                $("form[name=form1]").attr("action", "{:U('Export/Admin/export_company')}");
                $("form[name=form1]").submit();
            });
            $("#ExPort_s").click(function () {
                var qsDialog = $(this).dialog({
                    title: '批量导出',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Export/Admin/ajax_export_company')}";
                $.getJSON(url, function (result) {
                    qsDialog.setContent(result.data);
                });
            });
        </if>
    });
</script>
</html>